
CXXFLAGS = -O2 -g -Wall -fmessage-length=0 $(INCLUDES)
LDFLAGS      = -shared

COMN_DIR=../comn


SOURCE = $(wildcard *.cpp)
OBJS =	$(SOURCE:.cpp=.o)

INCLUDES = -I. \
	-I./include -I./src \
	-I$(COMN_DIR)/include \

	
LIBS = -lpthread \
	-L$(COMN_DIR)/lib -lcomn \
	
	

ifeq ($(OS),Windows_NT)
	LIBS += -lws2_32
else
	CXXFLAGS +=-fPIC
endif

TARGET = ../bin/libTsCaster.so

$(TARGET):	$(OBJS)
	$(CXX) -o $(TARGET) $(OBJS) $(LIBS) $(LDFLAGS)

all:	$(TARGET)

clean:
	rm -f $(OBJS) $(TARGET)
